/*
 * @Description:
 * @Version: 2.0
 * @Autor: wsh
 * @Date: 2023-06-20 18:06:09
 * @LastEditors: uphldjx 1373577124@qq.com
 * @LastEditTime: 2024-07-25 14:28:17
 */
import practitioner from '@/apiMod/modules/practitioner'
import { uploadType } from '@/utils/util'
const tableConfig = {
	stripe: true,
	border: true,
	maxHeight: '80vh',
	columns: [
		{ label: '身份证号', prop: 'idCard' },
		{ label: '姓名', prop: 'staffName' },
		{ label: '联系方式', prop: 'staffPhone' },
		{ label: '工作类型', prop: 'jobTypeLabel' },
		{ label: '岗位类型', prop: 'postTypeLabel' },
		{ label: '入职时间', prop: 'entryDate' },
		{
			label: '状态',
			prop: 'status',
			custome: 'tag',
			dicData: [
				{ label: '在职', value: 0, type: 'success' },
				{ label: '离职', value: 1, type: 'danger' },
			],
		},
		{
			label: '操作',
			prop: 'menu',
			width: 300,
			fixed: 'right',
		},
	],
}

export const baseConfig = {
	pageName: '机构员工管理',
	dictcodes: ['NURSE_LEVEL', 'GENDER', 'WORK_TYPE', 'POSITION_TYPE'],
	rowKey: 'id',
	tipLabel: 'staffName',
	api: {
		index: 'view_dpOrgStaffInfo_page',
		detail:'view_dpOrgStaffInfo_view',
		edit: 'view_staff_edit',
		delete: 'view_staff_delete',
	},
	auth: {
		index: 'view_dpOrgStaffInfo_page',
		detail:'view_dpOrgStaffInfo_view',
		edit: 'view_staff_edit',
		delete: 'view_staff_delete',
		// 批量搜索
		mulitSet: 'mulitSet',
	},
	menuBtn: [
		{
			icon: 'detail',
			label: '详情',
			type: 'primary',
			operate: 'detail',
			auth: 'view_dpOrgStaffInfo_page',
			text: true,
			show: true,
		},
		{
			icon: 'edit',
			label: '编辑',
			type: 'primary',
			operate: 'edit',
			auth: 'view_staff_edit',
			text: true,
			show: true,
		},
		{
			icon: 'delete',
			label: '删除',
			type: 'primary',
			operate: 'delete',
			auth: 'view_staff_delete',
			text: true,
			show: true,
		},
	],
	dialogConfig: {
		width: '80%',
	},
	// 搜索
	searchConfig: {
		inline: true,
		showBtn: true,
		labelPosition: 'left',
		column: [
			{ label: '姓名', prop: 'staffName', span: 8 },
			{ label: '身份证号', prop: 'idCard', span: 8 },
			{
				label: '入职时间',
				prop: 'entryDateBetween',
				type: 'dateBetween',
				valueFormat: 'YYYY-MM-DD HH:mm:ss',
				span: 8,
			},
			{
				label: '职业类型',
				prop: 'jobType',
				propName: 'jobTypeLabel',
				type: 'remoteSelect',
				api: 'getDictItemList',
				code: 'OCCUPATION_TYPE',
				span: 8,
			},
			{
				label: '岗位类型',
				prop: 'postType',
				propName: 'postTypeLabel',
				type: 'remoteSelect',
				api: 'getDictItemList',
				code: 'POSITION_TYPE',
				span: 8,
			},
			{
				label: '状态',
				prop: 'status',
				type: 'select',
				dicData: [
					{ label: '在职', value: 0, type: 'success' },
					{ label: '离职', value: 1, type: 'danger' },
				],
				span: 8,
			},
		],
	},
	tableConfig,
}
